'''Utility which tries to locate the Tcl/Tk 8.0 DLLs on Windows.
This is a no-op on other platforms.
'''
NO_TCL_MESSAGE = "WHOOPS! I can't find a Tcl/Tk 8.0 installation anywhere.\nPlease make sure that Tcl.Tk 8.0 is installed and that the PATH\nenvironment variable is set to include the Tcl/bin directory\n(or wherever TK80.DLL and TCL80.DLL are installed).\nIf you don't know how to fix this, consider searching the Python FAQ\nfor the error you get; post to the comp.lang.python if all else fails.\nRead the source file FixTk.py for details.\n"
NO_TKINTER_MESSAGE = "WHOOPS! Even though I think I have found a Tcl/Tk 8.0 installation,\nI can't seem to import the _tkinter extension module.\nI get the following exception:\n ImportError: %s\nIf you don't know how to fix this, consider searching the Python FAQ\nfor the error you get; post to the comp.lang.python if all else fails.\nRead the source file FixTk.py for details.\n"
import sys
if sys.platform == 'win32':
try:
import _tkinter
except ImportError:
import os
try:
path = os.environ['PATH']
except KeyError:
path = ''
python_exe = sys.executable
python_dir = os.path.dirname(python_exe)
program_files = os.path.dirname(python_dir)
def tclcheck(dir):
for dll in ('tcl80.dll', 'tk80.dll', 'tclpip80.dll'):